fixed compile error in gcc version 4.1.2 #1
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello.
I faced the problems while compiling this module with gcc version 4.1.2 and nginx-1.6.0.
And then i fixed codes.
....
-o objs/addon/ngx_kafka_module/ngx_http_kafka_module.o
/tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c
cc1: warnings being treated as errors
/tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c: In function ‘ngx_http_kafka_main_conf_broker_add’:
/tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c:162: warning: value computed is not used
make[1]: *** [objs/addon/ngx_kafka_module/ngx_http_kafka_module.o] Error 1
make[1]: Leaving directory `/tmp/nginx/nginx-1.6.0'
make: *** [build] Error 2
....
make -f objs/Makefile
make[1]: Entering directory
/tmp/nginx/nginx-1.6.0' cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/usr/local/include/hiredis/ -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/http/modules/perl -I src/mail \ -o objs/addon/ngx_kafka_module/ngx_http_kafka_module.o \ /tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c cc1: warnings being treated as errors /tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c: In function ‘ngx_http_kafka_post_callback_handler’: /tmp/nginx/ngx_kafka_module/ngx_http_kafka_module.c:285: warning: ‘main_conf’ may be used uninitialized in this function make[1]: *** [objs/addon/ngx_kafka_module/ngx_http_kafka_module.o] Error 1 make[1]: Leaving directory
/tmp/nginx/nginx-1.6.0'make: *** [build] Error 2